<template>
	<view class="privacy">
    <view style="padding: 150rpx 0; text-align: center;" v-if="show && list.length === 0">暂无数据~</view>
    <view v-for="item in list" class="item">
      <view class="le">
        <view class="u-font-32">{{item.memo}}</view>
        <view class="u-font-26 time">{{item.createtime_text}}</view>
      </view>
      <view class="num">
        <template v-if="item.type_id == 1">+</template>
        <template v-if="item.type_id == 2">-</template>
        {{item.score}}
      </view>
    </view>
  </view>
</template>

<script>
// #ifdef H5
// import { weixinShare } from '@/common/fa.weixin.mixin.js';
// #endif
export default {
	// mixins: [
	// 	// #ifdef H5
	// 	weixinShare
	// 	// #endif
	// ],
	onLoad() {
		
	},
	onShow() {
		this.getList()
	},
	
	data() {
		return {
			content:'',
      list:[],
      page:1,
      total:0,
      show:false
		};
	},
	methods: {
		getList(){
      this.$api.getScoreListApi({page: this.page}).then(res=>{
        this.show = true
        this.list = res.data.concat(this.list)
        this.page = this.page+1;
        
      })
    }
  },
  onReachBottom() {
    if(this.total > 0 && this.list.length < this.total){
      this.getList()
    }
  }
};
</script>


<style lang="scss" scoped>
.privacy{
  padding: 30rpx; box-sizing: border-box;
}
.item{
  display: flex; align-items: center; justify-content: space-between; border-radius: 8rpx; background-color: #fff; padding: 20rpx 30rpx; margin-bottom: 20rpx;
  .num{color: #2979ff; font-size: 36rpx;}
  .time{color: #888; margin-top: 8rpx;}
}
</style>
